package com.lvmama.rhino.service.impl.comment;

import com.lvmama.rhino.mapperComment.SaveDataMapper;
import com.lvmama.rhino.pojo.comment.entity.CommentDetail;
import com.lvmama.rhino.pojo.comment.entity.ViewDetail;
import com.lvmama.rhino.service.comment.SaveDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: SaveDataServiceImpl
 * @Description: 数据保存实现类
 * @author shenlinli
 * @date 2017年9月18日 下午5:34:40
 */
@Service
public class SaveDataServiceImpl implements SaveDataService {

	@Autowired
	private SaveDataMapper saveDataMapper;

	@Override
	public void insertViewList(List<ViewDetail> viewpoints) {
		saveDataMapper.insertViewList(viewpoints);
	}

	@Override
	public void insertCommentList(List<CommentDetail> commentList) {
		saveDataMapper.insertCommentList(commentList);
	}

	@Override
	public void updateCommentList(List<CommentDetail> commentList) {
		saveDataMapper.updateCommentList(commentList);
	}

	@Override
	public List<CommentDetail> queryByCommentId(CommentDetail detail) {
		return saveDataMapper.queryByCommentId(detail);
	}

	@Override
	public List<CommentDetail> queryCommentListByTime(Date beginDate,
			Date endDate) {
		// TODO Auto-generated method stub
		return saveDataMapper.queryCommentListByTime(beginDate, endDate);
	}

}
